import { post, get } from '../http'
import { domainid } from '@/utils/cloud/utils'

// 获取租户列表
export function getDomainListApi(data) {
  return get(`/domain/list`, data)
}

// 查询站点
export function getSitesApi(params) {
  const param = {
    domainid: domainid(),
    include_hide: 1,
    ...params
  }

  let data = {
    application: 'linku_ems',
    datasource: 'ems_backend',
    name: 'energy_station_query',
    param
  }
  return post('/datapool/mysql?format=row', data)
}
